package spring.cloud.tasks.executor.listener.election;

import lombok.Getter;
import lombok.Setter;
import lombok.extern.slf4j.Slf4j;

/**
 * Saturn主服务器根节点名称的常量类.
 */
@Slf4j
@Setter
@Getter
public final class ElectionNode {

    /**
     * Saturn主服务器根节点.
     */
    public static final String ROOT = "leader";

    static final String ELECTION_ROOT = ROOT + "/election";

    public static final String LEADER_HOST = ELECTION_ROOT + "/host";

    static final String LATCH = ELECTION_ROOT + "/latch";

    private final String taskId;

    ElectionNode(final String jobName) {
        this.taskId = jobName;
    }

}
